#include "showcastatus.h"
#include "ui_showcastatus.h"

showCAStatus::showCAStatus(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::showCAStatus)
{
    ui->setupUi(this);
    CALabel = new QLabel;
    timeStepsElapsed = new QLabel;
    myStatusBar = ui->statusbar;
    myStatusBar->addWidget(timeStepsElapsed);
}

showCAStatus::~showCAStatus()
{
    delete ui;
}

void showCAStatus::showPixmap(QPixmap *pix)
{
    CALabel->setPixmap(*pix);
    ui->showArea->setBackgroundRole(QPalette::Dark);
    ui->showArea->setWidgetResizable(true);
    ui->showArea->setWidget(CALabel);
    this->show();
}

void showCAStatus::updateStatusBar(int &timeStepToShow)
{
    timeStepsElapsed->setText("Current time steps: " + QString::number(timeStepToShow));
}
